package com.weiyin.examination.module;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by lenovo on 2018/1/3.
 */

public class BottomModule implements Parcelable {
    private Integer bitmapId;
    private Integer greyBitmapId;
    private boolean click;

    public BottomModule() {
    }

    public BottomModule(Integer bitmapId, Integer greyBitmapId, boolean click) {
        this.bitmapId = bitmapId;
        this.greyBitmapId = greyBitmapId;
        this.click = click;
    }

    protected BottomModule(Parcel in) {
        click = in.readByte() != 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte((byte) (click ? 1 : 0));
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<BottomModule> CREATOR = new Creator<BottomModule>() {
        @Override
        public BottomModule createFromParcel(Parcel in) {
            return new BottomModule(in);
        }

        @Override
        public BottomModule[] newArray(int size) {
            return new BottomModule[size];
        }
    };

    public Integer getGreyBitmapId() {
        return greyBitmapId;
    }

    public void setGreyBitmapId(Integer greyBitmapId) {
        this.greyBitmapId = greyBitmapId;
    }

    public Integer getBitmapId() {
        return bitmapId;
    }

    public void setBitmapId(Integer bitmapId) {
        this.bitmapId = bitmapId;
    }

    public boolean isClick() {
        return click;
    }

    public void setClick(boolean click) {
        this.click = click;
    }

}
